package com.zty.user;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;

/**
 * @Author ZTY
 * @Description SpringBoot启动类
 * @Date 11:45 2023-12-11
 **/

@SpringBootApplication
@MapperScan(value = "com.zty.*.dao") //将UserMapper扫描到
@ComponentScan(value = "com.zty")   //将其他Spring容器类扫描到
@EnableCaching
public class UserApplication {
    public static void main(String[] args) {
        //  要启用异步日志，需要改一些配置
        System.setProperty("Log4jContextSelector", "org.apache.logging.log4j.core.async.AsyncLoggerContextSelector");

        SpringApplication.run(UserApplication.class, args);
    }

}
